using ASP;
using HoWave.Common;
using HoWave.Web.Admin;
using System;
using System.Data;
using System.Web.Profile;
using System.Web.UI;
public class HL_Admin_menu : UserControl
{
	public string AdminName;
	public string MainMune;
	public int AdminID;
	public OnlineAdmin admin = new OnlineAdmin();
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		if (!this.admin.CheckAdminLogin())
		{
			this.AdminName = this.admin.AdminName;
			this.AdminID = this.admin.AdminID;
		}
	}
	public string GetAdminChannel()
	{
		string text = "";
		Conn conn = new Conn();
		DataTable dataTable = conn.GetDataTable("select * from HL_Interface");
		if (dataTable.Rows.Count > 0)
		{
			for (int i = 0; i < dataTable.Rows.Count; i++)
			{
				string text2;
				if (dataTable.Rows[i]["AdminLoginOpenType"].ToString() == "1")
				{
					text2 = "null";
				}
				else
				{
					text2 = "'_blank'";
				}
				string text3 = text;
				text = string.Concat(new string[]
				{
					text3,
					"\t\t['<img src=images/themeoffice/search_text.png />','",
					dataTable.Rows[i]["InterfaceName"].ToString(),
					"','Admin_AdminSynchron.aspx?ID=",
					dataTable.Rows[i]["InterfaceID"].ToString(),
					"',",
					text2,
					",'",
					dataTable.Rows[i]["InterfaceName"].ToString(),
					"'],"
				});
			}
		}
		if (text.Length > 0)
		{
			text = text.Remove(text.Length - 1, 1);
		}
		conn.CloseConn();
		return text;
	}
}
